//
//  TouTiaoTableViewCell.m
//  LOU
//
//  Created by 要帅气的生活 on 15/11/6.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "TouTiaoTableViewCell.h"

@implementation TouTiaoTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.title = [[UILabel alloc] init];
        [self.contentView addSubview:self.title];
        self.title.text = @"标题·······";
        
        self.img = [[UIImageView alloc] init];
        [self.contentView addSubview:self.img];
        self.img.image = [UIImage imageNamed:@"toutiao.jpg"];
        
        self.neirong = [[UILabel alloc] init];
        [self.contentView addSubview:self.neirong];
        self.neirong.text = @"内容······";
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.title.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height/6);
    self.title.backgroundColor = [UIColor purpleColor];
    
    self.img.frame = CGRectMake(0, self.frame.size.height/6, self.frame.size.width, self.frame.size.height/9*5);
    self.img.backgroundColor = [UIColor redColor];
    
    self.neirong.frame = CGRectMake(0, self.frame.size.height/18*13, self.frame.size.width, self.frame.size.height/18*5);
    self.neirong.backgroundColor = [UIColor yellowColor];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
